package com.whfc.mach.dao;

import com.whfc.mach.entity.AppMachImg;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AppMachImgMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AppMachImg record);

    int insertSelective(AppMachImg record);

    AppMachImg selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AppMachImg record);

    int updateByPrimaryKey(AppMachImg record);

    /**
     * 批量插入图片
     *
     * @param machId
     * @param imgUrlList
     * @return
     */
    void batchInsert(@Param("machId") Integer machId, @Param("imgUrlList") List<String> imgUrlList);

    /**
     * 删除图片
     *
     * @param machId
     */
    void deleteLogicByMachId(@Param("machId") Integer machId);

    /**
     * 查找设备图片
     *
     * @param machId
     * @return
     */
    List<String> selectImgListByMachId(@Param("machId") Integer machId);

    /**
     * 根据设备id的集合查找图片
     *
     * @param machIds
     * @return
     */
    List<AppMachImg> selectImgListByMachIds(@Param("machIds") List<Integer> machIds);
}